<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'jizhang.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">    
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type='text/javascript' src='resource/js/jquery-1.9.1.min.js'></script>
</head>
  
<body>
	<input type="button" value="＜＜返回" style="cursor: pointer;" onclick="window.history.back(-1);">
	<form action="<%=basePath %>TradeLogAction" method="post">
		<table>
		<tr>
			<th>当前账户可用余额：</th>
			<td>
				${acc.availableBalance }
			</td>
		</tr><tr>
			<th>记账类型：</th>
			<td>
				<select name="trade_type">
					<option value="1">收入</option>
					<option value="0">支出</option>
					<option value="-1">冲正</option>
				</select>
			</td>
		</tr><tr>	
			<th>冲正记账编号：</th>
			<td>
				<input name="correct_trade" id="correct_trade">
			</td>
		</tr><tr>
			<th>消费类型：</th>
			<td>
				<select name="carrier" id="carrier">
				  	<c:forEach items="${carries }" var="obj">
				  		<option value="${obj.id }">${obj.ca_name }</option>
					</c:forEach>
				</select>
			</td>
		</tr><tr>
			<th>消费描述：</th>
			<td>
				<input name="trade_desp" id="trade_desp" >
			</td>
		</tr><tr>
			<th>消费金额：</th>
			<td>
				<input name="amount" id="amount" >
			</td>
		</tr><tr>
			<th colspan="2">
				<input type="hidden" name="acc" value="${acc.id }">
				<input type="hidden" name="op" value="AD">
				<input type="submit" value=" 提交 ">
			</th>
		</tr>
		</table>
	</form>
</body>
</html>
